/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ProblemQueryRequest } from '../models/ProblemQueryRequest';
import type { ProblemSubmissionRequest } from '../models/ProblemSubmissionRequest';
import type { Response } from '../models/Response';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class ProblemControllerService {
    /**
     * getSubmission
     * @param problemSubmissionRequest problemSubmissionRequest
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static getSubmissionUsingPost(
        problemSubmissionRequest: ProblemSubmissionRequest,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/problem/getSubmission',
            body: problemSubmissionRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * listProblemByUser
     * @param problemQueryRequest problemQueryRequest
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static listProblemByUserUsingPost(
        problemQueryRequest: ProblemQueryRequest,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/problem/listByUser/page',
            body: problemQueryRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getProblemByProblemId
     * @param problemId problemId
     * @returns Response OK
     * @returns any Created
     * @throws ApiError
     */
    public static getProblemByProblemIdUsingPost(
        problemId: number,
    ): CancelablePromise<Response | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/problem/{problemId}',
            path: {
                'problemId': problemId,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
}
